﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace SchoolService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IServiceSchool
    {
        [OperationContract]
        [WebInvoke(Method= "GET",
        UriTemplate = "AddClass/{className}")]
        string AddClass(string className);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "DeleteClass/{className}")]
        string DeleteClass(string className);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "AddStudent/{studentName}/{className}")]
        string AddStudent(string studentName, string className);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "DeleteStudent/{studentID}")]
        string DeleteStudent(string studentID);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "EditStudent/{studentID}/{newStudentName}")]
        string EditStudent(string studentID, string newStudentName);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "EditStudentClass/{studentID}/{newStudentClass}")]
        string EditStudentClass(string studentID, string newStudentClass);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "GetAllStudentsFromClass/{className}")]
        string GetAllStudentsFromClass(string className);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "AddSubject/{subjectName}")]
        string AddSubject(string subjectName);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "DeleteSubject/{subjectName}")]
        string AddDeleteSubject(string subjectName);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "EditSubject/{subjectName}/{newSubjectName}")]
        string EditSubject(string subjectName, string newSubjectName);


        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "AddSubjectToClass/{subjectName}/{className}")]
        string AddSubjectToClass(string subjectName, string className);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "RemoveSubjectToClass/{subjectName}/{className}")]
        string RemoveSubjectFromClass(string subjectName, string className);

        [OperationContract]
        [WebInvoke(Method = "GET",
        UriTemplate = "GetClassSubjects/{className}")]
        string GetClassSubjects(string className);
    }
}
